post /vms/{vmId}/operations/detach

Detach (detach)

Once the Virtual Machine is in "Ready to detach" state and the preparing to detach task completes successfully, you can detach the VM. You must assign a scheduled downtime slot for detaching. Detaching is a sequence in which the VM will shut down, perform necessary last synchronization including adjusting instance size, attach the native disks to the instance, and start the instance.

Path parameters

vmId (required)

Path Parameter — Virtual machine ID

Consumes

This API call consumes the following media types via the Content-Type request header:

  • application/json

Request body

detachRequest DetachVmRequest (required)

Body Parameter — Detach virtual machine request

targetInstanceType

String 

Return type

TaskId

value (optional)

String Entity ID

_type

String Task ID

Enum:

TaskId

 

 

AWS Example data

Content-Type: application/json

{

"targetInstanceType": "t2.medium"

}

 

Azure Example data

Content-Type: application/json

{

"targetInstanceType": "Standard_D1_v2"

}

 

GCP Example data

Content-Type: application/json

{

"targetInstanceType": "n1-standard-1"

}

 

 

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

  • application/json

Responses

201

Created TaskId

Default

Error ErrorInfo

errorCode (optional)

String

url(optional)

String

message (optional)

String